from flask_wtf import FlaskForm
from wtforms import StringField, TextAreaField, SubmitField
from wtforms.validators import DataRequired


class PostForm(FlaskForm):
    """文章表单，输入框有： 文章标题和内容"""
    title = StringField('标题', validators=[DataRequired(message='标题不能为空')])
    content = TextAreaField('内容', validators=[DataRequired(message='内容不能为空')])
    submit = SubmitField('保存')


